$(function(){
	new Z.ImageBrowser($('input[name="home_cover"]'));
	new Z.ImageBrowser($('input[name="list_cover"]'));
	var content_zh = new baidu.editor.ui.Editor();
	content_zh.render('content_zh');
	var content_fr = new baidu.editor.ui.Editor();
	content_fr.render('content_fr');
	var content_en = new baidu.editor.ui.Editor();
	content_en.render('content_en');
    
	Z.tab($('form ul.tab-button a'),$('form div.tab-content'));
	
	$('form').submit(function(){
		content_zh.sync();
		content_fr.sync();
		content_en.sync();
		Z.ajax({
			url : $(this).attr('action'),
			type: $(this).attr('method'),
			data : $(this).serialize()
		});
		return false;
	});
});